package io.dshubs.archives.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dshubs.commons.mybatis.entity.BaseTenantEntity;
import io.dshubs.commons.tools.utils.DateUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 档案销毁表
 * </p>
 *
 * @author tan
 * @since 2021-08-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("archive_destroy")
public class ArchiveDestroy extends BaseTenantEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 题名
     */
    @TableField("destroy_title")
    private String destroyTitle;

    /**
     * 档号
     */
    @TableField("file_number")
    private String fileNumber;

    /**
     * 文件分类id
     */
    @TableField("category_id")
    private Long categoryId;

    /**
     * 销毁原因
     */
    @TableField("destroy_reason")
    private String destroyReason;

    /**
     * 销毁方式
     */
    @TableField("destroy_way")
    private String destroyWay;

    /**
     * 销毁状态
     */
    @TableField("destroy_state")
    private String destroyState;

    /**
     * 监销人
     */
    @TableField("sale_people")
    private String salePeople;

    /**
     * 销毁时间
     */
    @TableField("destroy_date")
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date destroyDate;

    /**
     * 删除标识  0：未删除    1：删除
     */
    @TableField("del_flag")
    private Integer delFlag;


    /**
     * 更新者
     */
    @TableField("updater")
    private Long updater;

    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;

    @TableField(exist = false)
    private String categoryName;


}
